#include<stdio.h>
#include<stdlib.h>
#include<filesystem>
using namespace std;
typedef struct teacher{
    char name[10];
    bool gender;
    int age;
    struct teacher *next;
}*st;
st newNode(){
    st node=(st)malloc(sizeof(struct teacher));
    scanf("%s %d %d",node->name,&node->gender,&node->age);
    node->next=NULL;
    return node;
}
st create_st(st head){
    if(head==NULL){
        st node=newNode();
        return node;
    }
    st p=head;
    st node=newNode();
    while(p->next){
        p=p->next;
    }
    p->next=node;
    return head;
}
void output(st head){
    st p=head;
    while(p){
        printf("%s\t%d\t%d\n",p->name,p->gender,p->age);
        p=p->next;
    }
        
}
int main(){
    st head=NULL;
    for(int i=0;i<2;i++)
    head=create_st(head);
    output(head);
    return 0;
}